package com.glsc.ngateway.common.base.repo.mysql.gateway.platform.system;

import com.glsc.ngateway.common.base.domain.mysql.gateway.system.SystemDepartment;
import com.glsc.ngateway.common.base.domain.mysql.gateway.system.SystemGroup;
import feign.Param;
import org.springframework.data.jpa.repository.JpaRepository;
import org.springframework.data.jpa.repository.JpaSpecificationExecutor;
import org.springframework.stereotype.Repository;

import java.util.List;

@Repository
public interface SystemDepartmentRepository extends JpaRepository<SystemDepartment, Integer>, JpaSpecificationExecutor<SystemGroup> {

    void deleteByOpId(Integer opId);

    List<SystemDepartment> queryAllByOpId(@Param("opId") Integer opId);
}